package com.java46.gougoussowebs.util;

import java.util.Properties;

/**
 * 邮件信息类
 */
public class MailSenderInfo {
    private String mailServerHost;  //服务器的主机号
    private String mailServerPort;  //服务器的端口号

    private String fromAdress;  //发送者的地址
    private String userName;    //发送者邮箱的账号
    private String password;    //发送者邮箱的密码
    private String toAdress;    //接收者的地址
    private String subject;     //邮件的主题
    private String content;     //邮件的发送类容


    /**
     * 获得邮件的session属性
     * @return
     */
    public Properties getProperties(){
        Properties properties = new Properties();
        properties.put("mail.smtp.host",this.mailServerHost);//邮件主机服务器
        properties.put("mail.smtp.port",this.mailServerPort);//邮件主机端口号
        properties.put("mail.smtp.auth",true);
        return properties;
    }

    public String getMailServerHost() {
        return mailServerHost;
    }

    public void setMailServerHost(String mailServerHost) {
        this.mailServerHost = mailServerHost;
    }

    public String getMailServerPort() {
        return mailServerPort;
    }

    public void setMailServerPort(String mailServerPort) {
        this.mailServerPort = mailServerPort;
    }

    public String getFromAdress() {
        return fromAdress;
    }

    public void setFromAdress(String fromAdress) {
        this.fromAdress = fromAdress;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getToAdress() {
        return toAdress;
    }

    public void setToAdress(String toAdress) {
        this.toAdress = toAdress;
    }

    public String getSubject() {
        return subject;
    }

    public void setSubject(String subject) {
        this.subject = subject;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }
}
